package com.hanserwei.community.entity.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class MenuVO implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 菜单ID，主键
     */
    @Schema(description = "菜单ID，主键")
    private Integer id;

    /**
     * 父级菜单ID，0表示顶级菜单
     */
    @Schema(description = "父级菜单ID，0表示顶级菜单")
    private Integer pid;

    /**
     * 菜单名称
     */
    @Schema(description = "菜单名称")
    private String name;

    /**
     * 菜单图标（Element UI图标名）
     */
    @Schema(description = "菜单图标（Element UI图标名）")
    private String icon;

    /**
     * 前端路由地址
     */
    @Schema(description = "前端路由地址")
    private String route;

    /**
     * 菜单排序号
     */
    @Schema(description = "菜单排序号")
    private Integer sortId;

    /**
     * 子菜单列表
     */
    @Schema(description = "子菜单列表",type = "List<MenuVO>")
    private List<MenuVO> children;

}
